$OpenBSD: patch-mmv_c,v 1.2 2017/04/30 13:55:57 naddy Exp $
--- mmv.c.orig
+++ mmv.c
@@ -88,7 +88,6 @@ on the command line.\n";
 #endif
 
 #include <stdio.h>
-#include <ctype.h>
 
 #ifdef MSDOS
 /* for MS-DOS (under Turbo C 1.5)*/
@@ -121,14 +120,14 @@ extern unsigned _stklen = 10000;
 #else
 /* for various flavors of UN*X */
 
+#include <string.h>
 #include <sys/types.h>
 #include <sys/stat.h>
 #include <sys/file.h>
+#include <ctype.h>
+#include <stdlib.h>
+#include <unistd.h>
 
-extern char *getenv();
-extern long lseek();
-extern char *malloc();
-
 #ifdef DIRENT
 #include <dirent.h>
 typedef struct dirent DIRENTRY;
@@ -142,8 +141,6 @@ typedef struct dirent DIRENTRY;
 typedef struct direct DIRENTRY;
 #endif
 
-#define void char	/* might want to remove this line */
-
 #ifndef O_BINARY
 #define O_BINARY 0
 #endif
@@ -176,7 +173,6 @@ extern char *strcpy(), *strchr();
 
 #else
 /* for System V and BSD */
-#include <string.h>
 #include <sys/signal.h>
 #include <fcntl.h>
 #endif
@@ -370,7 +366,7 @@ static int movealias(/* REP *first, REP *p, int *pprin
 static int snap(/* REP *first, REP *p */);
 static void showdone(/* REP *fin */);
 static void breakout(/*  */);
-static int breakrep(/* */);
+static void breakrep(/* */);
 static void breakstat(/* */);
 static void quit(/*  */);
 static int copymove(/* REP *p */);
@@ -389,7 +385,6 @@ static void cleanup(/*  */);
 static int getstat(/* char *full, FILEINFO *f */);
 static int dwritable(/* HANDLE *h */);
 static int fwritable(/* char *hname, FILEINFO *f */);
-static void memmove(/* void *to, void *from, int k */);
 #endif
 #ifndef RENAME
 static int rename(/* char *from, char *to */);
@@ -2550,10 +2545,9 @@ static void breakout()
 }
 
 
-static int breakrep()
+static void breakrep()
 {
 	gotsig = 1;
-	return(1);
 }
 
 
@@ -2745,7 +2739,7 @@ static int getreply(m, failact)
 	static FILE *tty = NULL;
 	int c, r;
 
-	fprintf(stderr, m);
+	fprintf(stderr, "%s", m);
 	if (tty == NULL && (tty = fopen(TTY, "r")) == NULL) {
 		fprintf(stderr, "Can not open %s to get reply.\n", TTY);
 		if (failact == -1)
@@ -2832,7 +2826,7 @@ static void chgive(p, k)
 }
 
 
-#ifndef MSDOS
+#if 0
 static void memmove(to, from, k)
 	char *to, *from;
 	unsigned k;
